package com.cswangdao.controller.user;

import com.cswangdao.domain.vo.WXOrderStatusNumVo;
import com.cswangdao.result.Result;
import com.cswangdao.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wx/user")
@Slf4j
public class WxUserController {


    @Autowired
    private UserService userService;

    @GetMapping("/index")
    public Result<Map<String, WXOrderStatusNumVo> > index() {
        log.info("各种订单状态数量查询");
        Map<String, WXOrderStatusNumVo> result = userService.index();
        return Result.success(result);
    }
}
